package com.mt.roll.core.dal.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 短信发送表
 * </p>
 *
 * @author mt
 * @since 2021-12-30
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_sms_send")
public class SmsSend extends Model<SmsSend> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键，自增
     */
      @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 公司ID，0为公用，默认使用0对应的短信场景
     */
    @TableField("corp_id")
    private Long corpId;

    /**
     * 短信场景ID
     */
    @TableField("scene_id")
    private Long sceneId;

    /**
     * 模板编号，第三方模板编码，如阿里云短信模板code
     */
    @TableField("template_code")
    private String templateCode;

    /**
     * 短信类型	            0、其他/未分类	            1、注册	            2、找回密码	            3、动态密码	            4、订单	            5、支付	            6、报告单	            9、系统通知
     */
    @TableField("type")
    private Integer type;

    /**
     * 手机号码，多个号码用户英文逗号（,）分隔
     */
    @TableField("mobile")
    private String mobile;

    /**
     * 短信内容
     */
    @TableField("content")
    private String content;

    /**
     * 关联ID，如：用户ID、订单ID等
     */
    @TableField("relation_id")
    private String relationId;

    /**
     * 短信接口测ID
     */
    @TableField("sid")
    private String sid;

    /**
     * 发送条数
     */
    @TableField("send")
    private Integer send;

    /**
     * 短信接口结果码
     */
    @TableField("result_code")
    private String resultCode;

    /**
     * 短信接口结果说明
     */
    @TableField("result_info")
    private String resultInfo;

    /**
     * 短信接口响应消息，完整的响应包
     */
    @TableField("response")
    private String response;

    /**
     * 删除标志，是否有效:1 可用 0不可用
     */
    @TableField("valid")
    @TableLogic
    private Integer valid;

    /**
     * 创建人
     */
    @TableField("creator")
    private Long creator;

    /**
     * 创建人姓名
     */
    @TableField("creator_name")
    private String creatorName;

    /**
     * 创建时间
     */
    @TableField("create_time")
    private LocalDateTime createTime;

    /**
     * 更新人
     */
    @TableField("updater")
    private Long updater;

    /**
     * 更新人姓名
     */
    @TableField("updater_name")
    private String updaterName;

    /**
     * 更新时间
     */
    @TableField("update_time")
    private LocalDateTime updateTime;

    /**
     * 版本号
     */
    @TableField("version")
    @Version
    private Integer version;


    public static final String ID = "id";

    public static final String CORP_ID = "corp_id";

    public static final String SCENE_ID = "scene_id";

    public static final String TEMPLATE_CODE = "template_code";

    public static final String TYPE = "type";

    public static final String MOBILE = "mobile";

    public static final String CONTENT = "content";

    public static final String RELATION_ID = "relation_id";

    public static final String SID = "sid";

    public static final String SEND = "send";

    public static final String RESULT_CODE = "result_code";

    public static final String RESULT_INFO = "result_info";

    public static final String RESPONSE = "response";

    public static final String VALID = "valid";

    public static final String CREATOR = "creator";

    public static final String CREATOR_NAME = "creator_name";

    public static final String CREATE_TIME = "create_time";

    public static final String UPDATER = "updater";

    public static final String UPDATER_NAME = "updater_name";

    public static final String UPDATE_TIME = "update_time";

    public static final String VERSION = "version";

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
